<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      body {
        margin: 0;
        padding: 0;
        display: flex;
        justify-content: center;
        padding: 300px 0;
      }
      .imgs {
        width: 300px;
        /* 左上、右上、右下、左下的角的x、y坐标 */
        clip-path: polygon(0 0, 80% 0, 100% 100%, 20% 100%);
        margin: 0 -28px;
      }
      /* 左边的保持矩形 */
      .imgs:first-child {
        clip-path: polygon(0 0, 80% 0, 100% 100%, 0 100%);
      }
      /* 右边的保持矩形 */
      .imgs:nth-child(4) {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 20% 100%);
      }
    </style>
  </head>
  <body>
    <img src="../images/5.jpg" class="imgs" />
    <img src="../images/6.jpg" class="imgs" />
    <img src="../images/7.jpg" class="imgs" />
    <img src="../images/8.jpg" class="imgs" />
  </body>
</html>
